/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Initial Developer of the Original Code is
*   Nick Kreeger
* Portions created by the Initial Developer are Copyright (C) 2006-2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*   Nick Kreeger <nick.kreeger@park.edu>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */

#import "MailboxesOutlineView.h"

// Color codes.
static NSString *kBlueImageData = @"<25504446 2d312e33 0a25c4e5 f2e5eba7 f3a0d0c4 c60a3220 30206f62 6a0a3c3c 202f4c65 6e677468 20312030 2052202f 46696c74 6572202f 466c6174 65446563 6f646520 3e3e0a73 74726561 6d0a78da 2b540854 2854d077 cb355470 c9570804 001fac03 eb0a656e 64737472 65616d0a 656e646f 626a0a31 2030206f 626a0a32 330a656e 646f626a 0a332030 206f626a 0a3c3c20 2f547970 65202f50 61676520 2f506172 656e7420 34203020 52202f52 65736f75 72636573 20352030 2052202f 436f6e74 656e7473 20322030 2052202f 4d656469 61426f78 0a5b2030 20302031 2032342e 33393536 205d203e 3e0a656e 646f626a 0a352030 206f626a 0a3c3c20 2f50726f 63536574 205b202f 50444620 5d202f58 4f626a65 6374203c 3c202f46 6d312036 20302052 203e3e20 3e3e0a65 6e646f62 6a0a3620 30206f62 6a0a3c3c 202f4c65 6e677468 20372030 2052202f 54797065 202f584f 626a6563 74202f53 75627479 7065202f 466f726d 202f466f 726d5479 70652031 202f4242 6f78205b 0a302030 20312032 35205d20 2f526573 6f757263 65732038 20302052 202f4669 6c746572 202f466c 61746544 65636f64 65203e3e 0a737472 65616d0a 78da2b54 08542804 42430503 20343205 53c9b90a fa9eb986 0a2ef940 d940008d 8207f80a 656e6473 74726561 6d0a656e 646f626a 0a372030 206f626a 0a33350a 656e646f 626a0a38 2030206f 626a0a3c 3c202f50 726f6353 6574205b 202f5044 46202f49 6d616765 42202f49 6d616765 43202f49 6d616765 49205d20 2f584f62 6a656374 203c3c20 2f496d31 20392030 20520a3e 3e203e3e 0a656e64 6f626a0a 39203020 6f626a0a 3c3c202f 4c656e67 74682031 30203020 52202f54 79706520 2f584f62 6a656374 202f5375 62747970 65202f49 6d616765 202f5769 64746820 31202f48 65696768 74203235 0a2f436f 6c6f7253 70616365 20313120 30205220 2f426974 73506572 436f6d70 6f6e656e 74203820 2f46696c 74657220 2f466c61 74654465 636f6465 203e3e0a 73747265 616d0a78 da014b00 b4ffffff ff2f6dd5 5a99e659 99e55696 e45595e4 5392e351 90e24f8d e14c8be0 4988df47 85de4482 dd4180dc 3e7ddb3c 7ada3977 d93675d8 3371d631 6fd62e6c d52c6ad4 2a67d327 64d22562 d28cc029 6b0a656e 64737472 65616d0a 656e646f 626a0a31 30203020 6f626a0a 38360a65 6e646f62 6a0a3133 2030206f 626a0a3c 3c202f4c 656e6774 68203132 20302052 202f4e20 33202f41 6c746572 6e617465 202f4465 76696365 52474220 2f46696c 74657220 2f466c61 74654465 636f6465 203e3e0a 73747265 616d0a78 daad9607 50144b1e c67b362f bbb0a425 8725e79c a3440125 07451094 b0028f85 45322a87 8a9830a2 60223ce4 9930a022 a02049c5 4050928a 6415041e 0682a024 79bdbbbc e7bdbabb babaaaeb ada9f9a6 6ba67bbe dfffeb9d 06802c12 1413c340 0100a2a2 e3633d1d 6c68be1b fc68f84e 400654f8 1304c641 217131d6 eeeecee0 3fb6d957 00619d3b 34586381 ffadf1c4 c2090140 d4a1160c e3682b96 0ee6686f 964e8a8f 89873a9c a543c283 42a1de01 b57aacb7 a72dd497 59e38471 f45d960e e6e8a72c 9d1812c6 7ab60b00 347f7468 44340098 8f00e02c 43e97121 009058f3 8686c685 44417d0c 6acda828 261c9f54 07b57248 4c2c7c96 340ab506 8b0be795 e3e70170 20024019 fbd9e7f7 01801c77 00141d7f f629ce00 205b0f40 eed79f7d d39e6c56 88d08bb8 2d7abaec 2e846c03 00b67f79 795a1100 7c16004b c7979717 ce2f2f2f 15c177ee 05a08e11 92109bb8 c20b415a 00f86fd7 1ccf2b0d 0d274400 1a832310 49641e0a 1fbf0055 58444c5c 424a5a46 565e4149 59554d5d 534b4757 cfc0d0d8 c4d4dcc2 d2cadac6 cedec1d1 698db38b abbb87a7 b7cf3af8 fafe1b03 376d0e0a 0ea16f09 0b8ff825 322a9a19 b335362e 3e212939 65dbf61d a9ff48db b93b7d4f c6de7dfb 0f1ccc3c 74f8c8d1 63c7b34e 9cccce39 75faccd9 73b979f9 05bf169e 2ffaedc2 c58b972e 5f29be7a eddaf51b 25376fdd ba5d7aa7 acbcbce2 eebdcaca aafbd5d5 35b57575 f50f1e3e 7cd4f0f8 f193a7cf 9e353635 35b73c7f fea2b5b5 adbdbda3 b3f3e5ab 57af5f77 bd79d3dd d3d3dbd7 d7df3f30 38f8f6dd bbf74343 c31f3e8c 8c8e8dfd 3e3efef1 d3e7cf5f 262627a7 a6bfcecc ce7efb3e 373fbfb0 b8f4e3c7 324063f1 042e1237 8517da17 82f625a5 683272f2 8a4a2aaa 6a1a9ada 3a7afa06 46c62666 e616abac ac6dedec 5743fb6b 5d5cdddc 3dbdfeee 3f94be85 e59fc106 00fd27fe 04b0ebdf 13f889e0 ef0caeb3 19dc6633 a86031a8 ba7f9f85 a01e2278 d4d0b042 a0b9a505 02686b6b efe860fb efea7ad3 ddcdb63f 30f097fb 118efb8f ffe47ec5 fe1cb4cf f18f4263 b030015c 2432370f 85178640 902a242c 220a7320 29254d93 91959357 50545286 34d43534 b5b4611c f40d0c0c 211253c8 c41242b1 615161a5 62cd5a67 16180f48 06a259cf 661310b0 42279493 8f15409c 88ac30fa 13d20aa5 154c2b9c 3851e180 5a090b24 0541b149 dd609382 a0cafe0a 4b4d6d6d dd4f502c 4ecf5f40 489d2f61 407afafa 07dfbd1f 1e191bff f879727a e6dbdc22 f40f386b 9fd57086 001cce07 603d1d00 176500f6 3e804bfd 040034f8 1fe1ce0d 80b70940 4deb0154 d16b8014 3ab0d70f 8ab3b600 1a10000f 1002d240 1518023b e0054241 02d807ce 8152d00c 86c00f44 1431443c 11267204 29415a91 699408ca 1245471d 4755a186 d1fce855 6806fa1c ba09bd88 d1c20461 b2314d58 34d60a9b 86adc27e c719e2e2 70a5b819 bc113e05 5f43c012 9c09d984 61a20931 83f8924b 812b91eb 19498a14 477a46a6 9193c96d dceadcb9 dc4b3c01 3c35141a 259d32ca ebc65bca 27c9b78f 6f8a3f90 bf556095 4089a09c e059aa18 354f4856 a8585857 b84ac451 a44bf417 d145b163 e24ae2d5 123e1263 92195232 52d5d2fe d24bb442 192799af b2a7e5ac e526e50b 153c1531 8a654a61 cad2cabd 2a59aa9e 6a54b597 ea673482 34553427 b56ab48f ea6cd6d5 d3c3ebf5 ead71864 1b2619f9 195b9ac8 9ae24c3f 9abd316f b4a8b2bc b62adfea a475a64d baed2ebb 0cfb03ab 0f391c71 3ceb54b9 66dc59c8 c5c735d3 adce7dce d3c42bdd bb791d75 7da06f89 1fe2efbb b122507a 53c6e6df 83bd433a e80e5b6a c2ad221a 233d1843 d18931d4 ad77e27c 133089e5 c911dba4 b78fa4de 484bdde5 9c2ebee7 d3def6fd f70ee61e ca3cb2e7 d8f62ce6 c9f09cf8 d339677b f34c0a8e 167efa6d f5c52b57 085703ae 37dc94bf 7df0ce54 85efbdf2 fbd49ae4 babe87e6 0da79fcc 36ba365f 7dbed8e6 d351fc72 a1cba13b bb77a0bf ea2df1bd c7b0f148 c458c9f8 9d4f4d13 8253265f 756753be d7cf172e 619697ff aa3f0e7e 19f98118 90075ac0 0c3882f5 200c2481 032017dc 040da017 7c457810 15c40ed9 8ca422b9 c87da40f 0550f2a8 35a81854 0eaa0635 8a16445b a3a3d179 e816f432 461743c7 9cc5b461 b9b0b6d8 546c2576 0e678c4b c255e101 de1e7f00 df4e9020 8413ca88 68a217f1 027181cb 8deb22d7 32c98f54 4e1620c7 905f706b 719fe45e e009e169 a2e853f2 79c9bc29 bca37c1b f89af9ad f82b04b4 042e09ca 0a165215 a8c5427a 42d5c24e c22f45e8 2273a247 c5e4c5aa c57dc5a7 240e4baa 4a364a45 4893a46f d1fc65f0 32e5b2a1 7202724f e4d3148c 1426148b 95429515 95c7558a 5513d5ec d5c9eafd 1aa59ae9 5a7eda86 3a823ad3 ba9d7a15 fa450607 0d538c18 c69b4c3c 4cedcc8c cd4d2dcc 2ccd5759 58d9583b d978d86e b28bb3df bf3ad7a1 c4b1d169 7ead8133 c3e59aeb a8bb8c47 b0e779af 691f8b75 7bd7b76f 90f68bf6 6f089009 dcb9a92f c828f874 2891cedc f23adc31 a2365283 71395a9e 59b4552d f652bc4e 426d925b 72ffb6f8 1d7ca925 693e3be7 769fdb63 9531b1ef d201bf4c caa1b623 a78f0564 499ee8cd 2e3b75f2 4cdab933 79370aea 0b7b8a3e 5fa45ed6 2ff6b9b6 ed46decd c7b767cb 542a36dd 3b5af5b0 7ab1cef2 c1ae4777 1fff7866 dab4b7e5 692bb59d de59fa6a f18d434f 41dfc4a0 d3bbbca1 c9118fb1 5fc7173e af9fa89d 969d39f0 edd3fcc6 c51e76fd 59d52702 01408395 b7817567 c2aa5f01 6db0e262 880d1289 e4208f90 1994322a 10558c1a 42cba283 d0e7d1c3 18354c0c a6128bc7 c6611fe3 c470d1b8 2778597c 2abe8760 4e2820aa 13b3b910 2e26d700 c98bf484 6c41bec3 adc73dc8 13c43344 09a77ce1 4de643f3 1de3a7f1 df117012 1814dc41 95a4d609 450a0b08 d78a3045 e545bbc5 4e88bb49 70493c96 dc2bb55a 9a20fd82 764e2652 d64c8e24 f756be4a 215b71ab 9283b286 0a9fca37 d5f76aad eaf51ae5 9a17b40a b50b74f2 750bf48a f46f1a94 1b3e33ea 359e30c5 9889c0da 0558ee5c f59b55ab f594ad82 dd46fbec d52f1c7e 3819ad89 5a7bdeb9 db55d0cd cd3dcda3 de0be7ed e6736a5d b7afda86 78bf071b 4502e202 3b36ab04 a5078f85 7ad1cbc2 c4c30f45 2c453218 efa37d99 9d5bbd62 9be35d13 3a93fc93 07b7456e 5f483d9c 26bfb372 b773fa40 46ca3ef1 fdd507fd 32970f5f 3fea7f1c 9775f5e4 ba1cee53 95673ccf 4ee566e6 db144c14 5e280abe a07271f6 7275f1f1 6b8c1bf6 37256e7d 297d5896 5f1173cf a54ae4fe 484d595d c203a587 af1af63f d17bdad4 b8a569b1 25edf95c ebd6b6a1 0e8fceea 5782afe9 5de5dde8 1efbded4 bec3fdbb 070a061b de0ebf27 0e090d4d 0fbffbf0 6d1419c3 ff4e1947 c69b3fe6 7f3af339 ebcbbe89 b849df29 e5a9b1e9 d2afa766 b6cdfa7e 33f84ef9 fe61eed7 79bf05d9 85a9c5c6 a5ab3f2a 58f5e7ec 17d98dcb 96c960c6 d29c6ded c0ffb745 3112fe9c 83b54b24 d3a37dbc e0991f1e 12c01626 8e018f58 98406778 0527e7ec 55d9df34 5eb8cf54 65a9bb2e b1ff326e 3c3d99bd 1fb465c6 a4c44684 85c7d3ac e14e9d4e b36546c5 24c4d363 d5694ed1 219aea34 5d6d6d3d d67d7f00 c8be9381 0a656e64 73747265 616d0a65 6e646f62 6a0a3132 2030206f 626a0a32 3537370a 656e646f 626a0a31 31203020 6f626a0a 5b202f49 43434261 73656420 31332030 2052205d 0a656e64 6f626a0a 34203020 6f626a0a 3c3c202f 54797065 202f5061 67657320 2f436f75 6e742031 202f4b69 6473205b 20332030 2052205d 203e3e0a 656e646f 626a0a31 34203020 6f626a0a 3c3c202f 54797065 202f4361 74616c6f 67202f50 61676573 20342030 2052203e 3e0a656e 646f626a 0a313520 30206f62 6a0a3c3c 202f4372 65617469 6f6e4461 74652028 443a3230 30353033 31373139 33353439 2d303827 30302729 202f4d6f 64446174 65202844 3a323030 35303331 37313933 3534392d 30382730 3027290a 2f50726f 64756365 7220284d 6163204f 53205820 31302e33 2e352051 75617274 7a205044 46436f6e 74657874 29203e3e 0a656e64 6f626a0a 31362030 206f626a 0a5b203c 36373666 38383663 38643536 33366264 33383365 35316162 32653865 65313031 3e203c36 37366638 38366338 64353633 36626433 38336535 31616232 65386565 3130313e 0a5d0a65 6e646f62 6a0a7872 65660a30 2031370a 30303030 30303030 30302036 35353335 2066200a 30303030 30303031 31392030 30303030 206e200a 30303030 30303030 32322030 30303030 206e200a 30303030 30303031 33372030 30303030 206e200a 30303030 30303336 31322030 30303030 206e200a 30303030 30303032 34352030 30303030 206e200a 30303030 30303033 31302030 30303030 206e200a 30303030 30303034 39372030 30303030 206e200a 30303030 30303035 31352030 30303030 206e200a 30303030 30303036 30342030 30303030 206e200a 30303030 30303038 35352030 30303030 206e200a 30303030 30303335 37352030 30303030 206e200a 30303030 30303335 35342030 30303030 206e200a 30303030 30303038 37342030 30303030 206e200a 30303030 30303336 37312030 30303030 206e200a 30303030 30303337 32312030 30303030 206e200a 30303030 30303338 36342030 30303030 206e200a 74726169 6c65720a 3c3c202f 53697a65 20313720 2f526f6f 74203134 20302052 202f496e 666f2031 35203020 52202f49 44203136 20302052 203e3e0a 73746172 74787265 660a3339 35340a25 25454f46 0a>";
static NSString *kGrayImageData = @"<25504446 2d312e33 0a25c4e5 f2e5eba7 f3a0d0c4 c60a3220 30206f62 6a0a3c3c 202f4c65 6e677468 20312030 2052202f 46696c74 6572202f 466c6174 65446563 6f646520 3e3e0a73 74726561 6d0a78da 2b540854 2854d077 cb355470 c9570804 001fac03 eb0a656e 64737472 65616d0a 656e646f 626a0a31 2030206f 626a0a32 330a656e 646f626a 0a332030 206f626a 0a3c3c20 2f547970 65202f50 61676520 2f506172 656e7420 34203020 52202f52 65736f75 72636573 20352030 2052202f 436f6e74 656e7473 20322030 2052202f 4d656469 61426f78 0a5b2030 2e303838 33383939 20302031 2e333235 38352032 35205d20 3e3e0a65 6e646f62 6a0a3520 30206f62 6a0a3c3c 202f5072 6f635365 74205b20 2f504446 205d202f 584f626a 65637420 3c3c202f 466d3120 36203020 52203e3e 203e3e0a 656e646f 626a0a36 2030206f 626a0a3c 3c202f4c 656e6774 68203720 30205220 2f547970 65202f58 4f626a65 6374202f 53756274 79706520 2f466f72 6d202f46 6f726d54 79706520 31202f42 426f7820 5b0a3020 30203620 3235205d 202f5265 736f7572 63657320 38203020 52202f46 696c7465 72202f46 6c617465 4465636f 6465203e 3e0a7374 7265616d 0a78da2b 54085428 04423305 03203432 0553c9b9 0afa9eb9 860a2ef9 40d94000 8e0907fd 0a656e64 73747265 616d0a65 6e646f62 6a0a3720 30206f62 6a0a3335 0a656e64 6f626a0a 38203020 6f626a0a 3c3c202f 50726f63 53657420 5b202f50 4446202f 496d6167 6542202f 496d6167 6543202f 496d6167 6549205d 202f584f 626a6563 74203c3c 202f496d 31203920 3020520a 3e3e203e 3e0a656e 646f626a 0a392030 206f626a 0a3c3c20 2f4c656e 67746820 31302030 2052202f 54797065 202f584f 626a6563 74202f53 75627479 7065202f 496d6167 65202f57 69647468 2036202f 48656967 68742032 350a2f43 6f6c6f72 53706163 65203131 20302052 202f4269 74735065 72436f6d 706f6e65 6e742038 202f4669 6c746572 202f466c 61746544 65636f64 65203e3e 0a737472 65616d0a 78da65cf 510a8020 0004d1db a6512461 44125862 04118491 a5b7b5ff ddc75c60 4a418bb5 504e09fa 487c23f4 903b04e8 222739c8 4ebcdf20 b73ac8d2 d84ccc64 a091e841 433d519d 825ad210 594b4808 ac223f5f e7e70d0a 656e6473 74726561 6d0a656e 646f626a 0a313020 30206f62 6a0a3837 0a656e64 6f626a0a 31332030 206f626a 0a3c3c20 2f4c656e 67746820 31322030 2052202f 4e203320 2f416c74 65726e61 7465202f 44657669 63655247 42202f46 696c7465 72202f46 6c617465 4465636f 6465203e 3e0a7374 7265616d 0a78daad 96075014 4b1ec67b 362fbbb0 a4258725 e79ca344 01250745 1094b002 8f854532 2a878a98 30a26022 3ce49930 a022a020 49c54050 928a6415 041e0682 a02479bd bbbce7bd babbbaba aaebada9 f9a66ba6 7bbedfff eb9d0680 2c121413 c3400100 a2a2e363 3d1d6c68 be1bfc68 f84e4006 54f81304 c6412171 31d6eeee cee03fb6 d9570061 9d3b3458 6381ffad f1c4c209 0140d4a1 160ce368 2b960ee6 686f964e 8a8f8987 3a9ca543 c28342a1 de01b57a acb7a72d d49759e3 8471f45d 960ee6e8 a72c9d18 12c67ab6 0b00347f 74684434 00988f00 e02c43e9 71210090 58f38686 c6854441 7d0c6acd a828261c 9f5407b5 72484c2c 7c96340a b5068b0b e795e3e7 01702002 4019fbd9 e7f70180 1c770014 1d7ff629 ce00205b 0f40eed7 9f7dd39e 6c5688d0 8bb82d7a baec2e84 6c0300b6 7f79795a 11007c16 004bc797 9717ce2f 2f2f15c1 77ee05a0 8e119210 9bb8c20b 415a00f8 6fd71ccf 2b0d0d27 44001a83 23104964 1e0a1fbf 00555844 4c5c424a 5a46565e 41495955 4d5d534b 4757cfc0 d0d8c4d4 dcc2d2ca dac6cede c1d1698d b38babbb 87a7b7cf 3af8fafe 1b03376d 0e0a0ea1 6f090b8f f825322a 9a19b335 362e3e21 293965db f61da9ff 48dbb93b 7d4fc6de 7dfb0f1c cc3c74f8 c8d163c7 b34e9ccc ce3975fa ccd973b9 79f905bf 169e2ffa edc2c58b 972e5f29 be7aedda f51b2537 6fddba5d 7aa7acbc bce2eebd cacaaafb d5d535b5 7575f50f 1e3e7cd4 f0f8f193 a7cf9e35 363535b7 3c7ffea2 b5b5adbd bda3b3f3 e5ab57af 5f77bd79 d3ddd3d3 dbd7d7df 3f3038f8 f6ddbbf7 4343c31f 3e8c8c8e 8dfd3e3e fef1d3e7 cf5f2626 27a7a6bf ceccce7e fb3e373f bfb0b8f4 e3c73240 63f1042e 12378517 da1782f6 25a56832 72f28a4a 2aaa6a1a 9ada3a7a fa0646c6 2666e616 abacac6d edec5743 fb6b5d5c dddc3dbd feee3f94 be85e59f c10600fd 27fe04b0 ebdf13f8 89e0ef0c aeb319dc 6633a860 31a8ba7f 9f85a01e 2278d4d0 b042a0b9 a5050268 6b6befe8 60fbefea 7ad3ddcd b63f30f0 97fb118e fb8fffe4 7ec5fe1c b4cff18f 4263b030 015c2432 370f8517 8640902a 242c220a 73202925 4d939195 93575054 528634d4 3534b5b4 611cf40d 0c0c2112 53c8c412 42b16151 61a562cd 5a671618 0f4806a2 59cf6613 10b04227 94938f15 409c88ac 30fa13d2 0aa5154c 2b9c3851 e1805a09 0b240541 b149dd60 9382a0ca fe0a4b4d 6d6ddd4f 502c4ecf 5f40489d 2f61407a fafa07df bd1f1e19 1bfff879 727ae6db dc22f40f 386b9fd5 7086001c ce07603d 1d001765 00f63e80 4bfd0400 34f81fe1 ce0d80b7 09404deb 0154d16b 80143ab0 d70f8ab3 b6001a10 000f1002 d2401518 023be005 424102d8 07ce8152 d00c86c0 0f441431 443c1126 72042941 5a916994 08ca1245 471d4755 a186d1fc e8556806 fa1cba09 bd88d1c2 0461b231 4d5834d6 0a9b86ad c27ec719 e2e270a5 b819bc11 3e055f43 c0129c09 d98461a2 093183f8 924b812b 91eb1949 8a14477a 46a69193 c96ddcea dcb9dc4b 3c013c35 141a259d 32caebc6 5bca27c9 b78f6f8a 3f90bf55 60954089 a09ce059 aa18354f 4856a858 5857b84a c451a44b f417d145 b163e24a e2d5123e 12639219 523252d5 d2fed24b b4421927 99afb2a7 e5ace526 e50b153c 15318a65 4a61cad2 cabd2a59 aa9e6a54 b597ea67 34823455 3427b56a b48fea6c d6d5d3c3 ebf5ead7 18641b26 19f9195b 9ac89ae2 4c3f9abd 316fb4a8 b2bcb62a dfeaa475 a64dbaed 2ebb0cfb 03ab0f39 1c713ceb 54b966dc 59c8c5c7 35d3adce 7dced3c4 2bddbb79 1d757da0 6f891fe2 efbbb122 507a53c6 e6df83bd 433ae80e 5b6ac2ad 221a233d 1843d189 31d4ad77 e27c1330 89e5c911 dba4b78f a4de484b dde59c2e bee7d3de f6fdf70e e61eca3c b2e7d8f6 2ce6c9f0 9cf8d339 677bf34c 0a8e167e fa6df5c5 2b570857 03ae37dc 94bf7df0 ce5485ef bdf2fbd4 9ae4babe 87e60da7 9fcc36ba 365f7dbe d8e6d351 fc72a1cb a13bbb77 a0bfea2d f1bdc7b0 f148c458 c9f89d4f 4d138253 265f7567 53bed7cf 172e6196 97ffaa3f 0e7e19f9 81189007 5ac00c38 82f5200c 24810320 17dc040d a0177c45 781015c4 0ed98ca4 22b9c87d a40f0550 f2a835a8 18540eaa 06358a16 445ba3a3 d179e816 f4324617 43c79cc5 b461b9b0 b6d8546c 25760e67 8c4bc255 e101de1e 7f00df4e 90208413 ca8868a2 17f10271 81cb8deb 22d732c9 8f544e16 20c7905f 706b719f e45ee009 e169a2e8 53f279c9 bc29bca3 7c1bf89a f9adf82b 04b4042e 09ca0a16 5215a8c5 427a42d5 c24ec22f 45e82273 a247c5e4 c5aac57d c5a7240e 4baa4a36 4a454893 a46fd1fc 65f032e5 b2a17202 724fe4d3 148c1426 148b9542 951595c7 558a5513 d5ecd5c9 eafd1aa5 9ae95a7e da863a82 3ad3ba9d 7a15fa45 06070d53 8c18c69b 4c3c4ced cc8ccd4d 2dcc2ccd 575958d9 583bd978 d86eb28b b3dfbf3a d7a1c4b1 d1697ead 8133c3e5 9aeba8bb 8c47b0e7 79af691f 8b757bd7 b76f90f6 8bf66f08 9009dcb9 a92fc828 f8742891 cedcf23a dc31a236 52837139 5a9e59b4 552df652 bc4e426d 925b72ff b6f81d7c a925693e 3be7769f db639531 b1efd201 bf4ccaa1 b623a78f 0564499e e8cd2e3b 75f24cda b9337937 0aea0b7b 8a3e5fa4 5ed62ff6 b9b6ed46 decdc7b7 67cb542a 36dd3b5a f5b07ab1 cef2c1ae 47771fff 7866dab4 b7e5692b b59dde59 fa6af18d 434f41df c4a0d3bb bca1c911 8fb15fc7 173eaf9f a89d969d 39f0edd3 fcc6c51e 76fd59d5 27020140 8395b781 7567c2aa 5f016db0 e262880d 1289e420 8f901994 322a1055 8c1a42cb a283d0e7 d1c31835 4c0ca612 8bc7c661 1fe3c470 d1b82778 597c2abe 87604e28 20aa13b3 b9102e26 d700c98b f4846c41 bec3adc7 3dc813c4 334409a7 7ce14de6 43f31de3 a7f1df11 70121814 dc4195a4 d609450a 0b08d78a 3045e545 bbc54e88 bb497049 3c96dc2b b55a9a20 fd82764e 2652d64c 8e24f756 be4a215b 71ab9283 b2860a9f ca37d5f7 6aadeaf5 1ae59a17 b40ab50b 74f2750b f48af46f 1a941b3e 33ea359e 30c59889 c0da0558 ee5cf59b 55abf594 ad82dd46 fbecd52f 1c7e3819 ad895a7b deb9db55 d0cdcd3d cda3de0b e7ede673 6a5db7af da8678bf 071b4502 e2023b36 ab04a507 8f857ad1 cbc2c4c3 0f452c45 3218efa3 7d999d5b bd629be3 5d133a93 fc9307b7 456e5f48 3d9c26bf b372b773 fa4046ca 3ef1fdd5 07fd3297 0f5f3fea 7f1c9775 f5e4ba1c ee539567 3ccf4ee5 66e6db14 4c145e28 0abea072 71f67275 f1f16b8c 1bf63725 6e7d297d 58965f11 73cfa54a e4fe484d 595dc203 a587af1a f63fd17b dad4b8a5 69b125ed f95cebd6 b6a10e8f ceea5782 afe95de5 dde81efb ded4bec3 fdbb070a 061bde0e bf270e09 0d4d0fbf fbf06d14 19c3ff4e 1947c69b 3fe67f3a f339ebcb be89b849 df29e5a9 b1e9d2af a766b6cd fa7e33f8 4ef9fe61 eed779bf 05d985a9 c5c6a5ab 3f2a58f5 e7ec17d9 8dcb96c9 60c6d29c 6dedc0ff b7453112 fe9c83b5 4b24d3a3 7dbce099 1f1e12c0 16268e01 8f589840 67780527 e7ec55d9 df345eb8 cf5465a9 bb2eb1ff 326e3c3d 99bd1fb4 65c6a4c4 468485c7 d3ace14e 9d4eb365 46c524c4 d363d569 4ed1219a ea345d6d 6d3dd67d 7f00c8be 93810a65 6e647374 7265616d 0a656e64 6f626a0a 31322030 206f626a 0a323537 370a656e 646f626a 0a313120 30206f62 6a0a5b20 2f494343 42617365 64203133 20302052 205d0a65 6e646f62 6a0a3420 30206f62 6a0a3c3c 202f5479 7065202f 50616765 73202f43 6f756e74 2031202f 4b696473 205b2033 20302052 205d203e 3e0a656e 646f626a 0a313420 30206f62 6a0a3c3c 202f5479 7065202f 43617461 6c6f6720 2f506167 65732034 20302052 203e3e0a 656e646f 626a0a31 35203020 6f626a0a 3c3c202f 43726561 74696f6e 44617465 2028443a 32303035 30333137 31393236 31362d30 38273030 2729202f 4d6f6444 61746520 28443a32 30303530 33313731 39323631 362d3038 27303027 290a2f50 726f6475 63657220 284d6163 204f5320 58203130 2e332e35 20517561 72747a20 50444643 6f6e7465 78742920 3e3e0a65 6e646f62 6a0a3136 2030206f 626a0a5b 203c6166 61393837 64633963 39333061 31643134 33396263 64323937 63656464 63353e20 3c616661 39383764 63396339 33306131 64313433 39626364 32393763 65646463 353e0a5d 0a656e64 6f626a0a 78726566 0a302031 370a3030 30303030 30303030 20363535 33352066 200a3030 30303030 30313139 20303030 3030206e 200a3030 30303030 30303232 20303030 3030206e 200a3030 30303030 30313337 20303030 3030206e 200a3030 30303030 33363232 20303030 3030206e 200a3030 30303030 30323534 20303030 3030206e 200a3030 30303030 30333139 20303030 3030206e 200a3030 30303030 30353036 20303030 3030206e 200a3030 30303030 30353234 20303030 3030206e 200a3030 30303030 30363133 20303030 3030206e 200a3030 30303030 30383635 20303030 3030206e 200a3030 30303030 33353835 20303030 3030206e 200a3030 30303030 33353634 20303030 3030206e 200a3030 30303030 30383834 20303030 3030206e 200a3030 30303030 33363831 20303030 3030206e 200a3030 30303030 33373331 20303030 3030206e 200a3030 30303030 33383734 20303030 3030206e 200a7472 61696c65 720a3c3c 202f5369 7a652031 37202f52 6f6f7420 31342030 2052202f 496e666f 20313520 30205220 2f494420 31362030 2052203e 3e0a7374 61727478 7265660a 33393634 0a252545 4f460a>";

static const float kRowHeight = 22;

@implementation MailboxesOutlineView

-(void)awakeFromNib
{
  mBlueGradient = [[NSImage alloc] initWithData:[kBlueImageData propertyList]];
  mGrayGradient = [[NSImage alloc] initWithData:[kGrayImageData propertyList]];
  [mGrayGradient setFlipped:YES];
  mIRect = NSMakeRect(0, 0, 1, [mBlueGradient size].height - 1);
  
  [self viewDidEndLiveResize];
}

-(void)dealloc
{
  [mBlueGradient release];
  [mGrayGradient release];
  [super dealloc];
}

-(id)_highlightColorForCell:(NSCell*)cell 
{ 
  return nil; 
}

-(void)highlightSelectionInClipRect:(NSRect)inRect
{
  NSRect selectedRect = [self rectOfRow:[self selectedRow]];
  
  // Draw the blue gradient.
  [mBlueGradient setFlipped:YES];
  [mBlueGradient drawInRect:selectedRect 
                   fromRect:mIRect 
                  operation:NSCompositeSourceOver 
                   fraction:1];
  
  // If we don't have focus, draw the gray gradient
  if ([self editedRow] == -1)
  {
    if ([[self window] firstResponder] != self || ![[self window] isKeyWindow])
    {
      [mGrayGradient drawInRect:selectedRect 
                       fromRect:mIRect 
                      operation:NSCompositeSourceOver 
                       fraction:1];
    }
  }
  
}

@end
